package net.ncraft.mc.ezframework.core.ezbatis;

import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Configuration {

    private final Map<Class<?>,Class<?>> MAPPERS = new HashMap<>();
    @Getter
    @Setter
    private Environment environment;

    public Configuration() {
    }

    public Configuration(Environment environment) {
        this.environment = environment;
    }

    public void addMapper(Class<?> mapper) {
        MAPPERS.put(mapper,mapper);
    }

    public List<Class<?>> getMappers() {
        List<Class<?>> mappers = new ArrayList<>();
        MAPPERS.forEach((k,v)-> mappers.add(v));
        return mappers;
    }

}
